/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.source.service.program;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.source.dao.program.EleSourceProgramDao;
import com.thinkgem.jeesite.modules.source.entity.program.EleSourceProgram;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 固件程序管理Service
 * @author unnamed
 * @version 2017-12-20
 */
@Service
@Transactional(readOnly = false)
public class EleSourceProgramService extends CrudService<EleSourceProgramDao, EleSourceProgram> {
	@Autowired
	private EleSourceProgramDao eleSourceProgramDao;	
	public EleSourceProgram get(String id) {
		return super.get(id);
	}
	
	public List<EleSourceProgram> findList(EleSourceProgram eleSourceProgram) {
		return super.findList(eleSourceProgram);
	}
	
	public Page<EleSourceProgram> findPage(Page<EleSourceProgram> page, EleSourceProgram eleSourceProgram) {
		return super.findPage(page, eleSourceProgram);
	}
	
	@Transactional(readOnly = false)
	public void save(EleSourceProgram eleSourceProgram) {
		super.save(eleSourceProgram);
	}
	
	@Transactional(readOnly = false)
	public void delete(EleSourceProgram eleSourceProgram) {
		super.delete(eleSourceProgram);
	}
	@Transactional(readOnly = false)
	public void updateGroupId(String groupId,String resourceId) {
		eleSourceProgramDao.updateGroupId(groupId, resourceId);
	}

	public List<EleSourceProgram> findNewVersionApp(String type,String remarks){
		return dao.findNewVersionApp(type,remarks);
	}
}